import request from '@/utils/request'

// 查询武将列表
export function listHero(query) {
  return request({
    url: '/sgs/hero/list',
    method: 'get',
    params: query
  })
}

// 查询武将详细
export function getHero(id) {
  return request({
    url: '/sgs/hero/' + id,
    method: 'get'
  })
}

// 新增武将
export function addHero(data) {
  return request({
    url: '/sgs/hero',
    method: 'post',
    data: data
  })
}

// 修改武将
export function updateHero(data) {
  return request({
    url: '/sgs/hero',
    method: 'put',
    data: data
  })
}

// 删除武将
export function delHero(id) {
  return request({
    url: '/sgs/hero/' + id,
    method: 'delete'
  })
}


// 下载武将导入模版
export function importTemplate() {
  return request({
    url: '/sgs/hero/importTemplate' ,
    method: 'get'
  })
}

// 估价武将
export function heroesPrice(data) {
  return request({
    url: '/sgs/hero/heroesPrice' ,
    method: 'post',
    data:data
  })
}
